<?php defined('BASEPATH') OR exit('No direct script access allowed');

class About_class extends CI_Model {
	
	
	public function get_about_us()
	{
		$this->db->select('*');
		$query = $this->db->from('about');
		$query = $this->db->where(array('intAboutID'=>1));
		$query = $this->db->get()->result_array();
		$query = current($query);
			
		if($query['intAboutID']==""){
			return 0;
		}else{
			return $query;
		}
	}
	public function update($post)
	{
		$data = array(
				'strAboutBody' => $post['strAboutBody']
		);
		$this->db->where(array('intAboutID'=>1));
		$this->db->update('about', $data);
		
		if($this->db->_error_number()==0)
		{
			$data['intStatus'] = 1; // Success
		}
		else
		{
			$data['intStatus'] = 0; // Failed
		}
		return $data;
	}
}